import pandas as pd 
import numpy as np 

dir=input("输入文件txt：(输入样例：D:\\ayan.txt)")
dir_out=input("保存在哪里（输入样例：D:\\ayansecond.txt）")
if dir=="":
    dir='D:\\ayan.txt'
if dir_out=="":
    dir_out='D:\\ayansecond.txt'
file=open(dir)
val_list=file.readlines()
lists=[]
for string in val_list:
    string=string.split(',',-1)
    lists.append(string)
n=np.array(lists)
# print(n.shape)
# n=np.reshape(n,(int(n.shape[1]/160),160))#first.txt
n=np.reshape(n,(int(n.shape[1]/152),152))#ayan.txt
print(n)
np.savetxt(dir_out,n,fmt='%s')